package com.clouddot.baipai.ui.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.clouddot.baipai.R;
import com.clouddot.baipai.http.entity.response.getClassMemberResponse;

import java.util.List;

/**
 * Created by wxy on 2018/8/26.
 */

public class V_ClassMemberAdapter extends BaseQuickAdapter<getClassMemberResponse.studentInfo, BaseViewHolder> {

    private List<getClassMemberResponse.studentInfo> mData;

    public V_ClassMemberAdapter(List<getClassMemberResponse.studentInfo> mDataList) {
        super(R.layout.v_adapter_classmember_item, mDataList);
        mData = mDataList;
    }


    @Override
    protected void convert(BaseViewHolder helper, getClassMemberResponse.studentInfo item) {

        helper.setText(R.id.tv_name, item.FullName);


        if (item.SexText.equals("女")) {
            helper.setBackgroundRes(R.id.image, R.drawable.woman);

        } else {
            helper.setBackgroundRes(R.id.image, R.drawable.man);


        }

    }

}
